The scriptable objects in MyAlbum:
VBScript example:
' The app object is predefined
app.Trace "MyAlbum version: " & app.Version
' Use the app object to get a album object
Dim alb, pic
set alb = app.GetCurrentAlbum
' Use the album object to get a keyword object
dim kw
set kw = alb.GetKeyword(0) ' Get first keyword
app.Trace "First keyword is = " & kw.sName
dim nbPic, i
nbPic = alb.nbPicture
app.Trace "Pictures in this album: " & nbPic
alb.nbSelectedPicture = 0 ' Clear the selection
for i=0 to nbPic-1
' Use the album object to get a picture object
Set pic = alb.GetPicture(i)
app.trace i & " : " & pic.sShortFileName
' Select all the pictures that have the keyword
if pic.HasKeyword( kw.sName ) then
pic.bSelected = True
end if
next
'Force the redraw of the album
alb.ReDraw